<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
        <h1>测试一下</h1>
</body>
</html>
<script>
    var vue2 = new Vue({
        el: '#articles',
        data:{
            allNews:[{title:"求索者", fromLink:"来源链接", summary:"摘要"}],
        },
        mounted: function(){
            this.getNews(0);
        },
        methods: {
            getNews: function(current){
                var self = this;
                var time = new Date();
                axios({
                    method: 'post',
                    url: 'http://localhost:8001/zzunews/news/pageNewsCondition/1/20',
                    data: {
                        begin: time.getFullYear()+'-'+(time.getMonth()+1)+'-'+(time.getDate()-1)+'-'+time.getHours()+'-'+time.getMinutes()+'-'+time.getSeconds(),
                        end: time.getFullYear()+'-'+(time.getMonth()+1)+'-'+time.getDate()+'-'+time.getHours()+'-'+time.getMinutes()+'-'+time.getSeconds()
                    }
                }).then(function (response) {
                    var jsonString = JSON.stringify(response.data);
                    var jsonObj = JSON.parse(jsonString);
                    self.allNews = jsonObj.data.rows;
                });
            }
        }
    })

</script>